<%-- 
    Document   : preparepaper
    Created on : Jun 25, 2012, 8:48:35 PM
    Author     : FRIENDS
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>prepare question paper</title>
    </head>
    <body>
        <%
        String courseid=helper.exam.getExambean(session.getAttribute("examid").toString()).getCourseid();
        int qno=Integer.parseInt(request.getParameter("qno"));
        int total=helper.course.getCourseBean(courseid).getNoofExams();
        %>
        
        <h1>question paper for course <%=courseid%></h1>
        total number of exams : <%=total%>
       <div style="margin-bottom: 30px;font-size: 20px">
            <div style="position: fixed;top:0px;right:500px;font-weight: bolder;background-color: black;color: yellow">remaing questions:  <%=(10-qno)%><span id="total"></span></div>
            <!--<div style="position: fixed;top:0px;right:200px;font-weight: bolder"><span id="present"></span></div>-->
       </div>
            <p>Question number <%=qno%></p>
       <form action="addquestion" method="post">
           <input type="hidden" name="qno" value="<%=qno%>" />
          
           <table>
               <tr><td>Question :</td><td><textarea name="question"></textarea></td></tr>
               <tr><td>option 1 :</td><td><input type="text" name="opt1" /></td></tr>
               <tr><td>option 2 :</td><td><input type="text" name="opt2" /></td></tr>
               <tr><td>option 3 :</td><td><input type="text" name="opt3" /></td></tr>
               <tr><td>option 4 :</td><td><input type="text" name="opt4" /></td></tr>
               <tr><td>correct answer :</td><td><select  name="answer" >
                           <option value="1">option 1</option>
                           <option value="2">option 2</option>
                           <option value="3">option 3</option>
                           <option value="4">option 4</option>
                   </td></tr>
               <tr><td>
                   <%if(qno!=2) {%><input type="submit" name="next" value="next >>" /><%}%>
                                    <input type="submit" name="finish" value="Finish" />
           </table>    
           
       </form>
    </body>
</html>
